package com.wyz.saas.module.patrol.bean.repository

import androidx.annotation.WorkerThread
import com.wyz.saas.module.patrol.bean.PatrolCheckpoint
import com.wyz.saas.module.patrol.bean.dao.PatrolCheckpointDao
import kotlinx.coroutines.flow.Flow

class PatrolCheckpointRepository(private val dao: PatrolCheckpointDao) {

    val allWords: Flow<List<PatrolCheckpoint>> = dao.getAlphabetizedWordsByFlow()

    @Suppress("RedundantSuspendModifier")
    @WorkerThread
    suspend fun insert(value: PatrolCheckpoint) {
        dao.insert(value)
    }
}